package com.kmfc.article.web;

import com.kmfc.article.dao.ArticlesDOWithBLOBs;
import com.kmfc.article.service.ArticlesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuzhonghong
 * @Package com.kmfc.article.web
 * @date 2025/3/12 22:31
 * version 1.0
 * Copyright @  2025/3/12 22:31  我不吃蛋黄
 */
@Slf4j
@RestController
@RequestMapping("/articles")
public class ArticlesController {

    @Autowired
    private ArticlesService articlesService;

    @GetMapping("/{id}")
    public ArticlesDOWithBLOBs selectByPrimaryKey(@PathVariable("id") Integer articleId) {
        return articlesService.selectByPrimaryKey(articleId);
    }

}
